package com.vehicle.car.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.vehicle.common.core.annotation.Excel;
import com.vehicle.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 驾驶证对象 driver_license_info
 *
 * @author XU
 * @date 2025-03-30
 */
public class DriverLicenseInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 表id */
    private Long id;

    /** 档案编号 */
    @Excel(name = "档案编号")
    private String fileNumber;

    /** 姓名 */
    @Excel(name = "姓名")
    @NotBlank( message = "姓名不能为空")
    private String name;

    /** 驾驶证号 */
    @Excel(name = "驾驶证号")
    @NotBlank( message = "驾驶证号不能为空")
    private String driverId;

    /** 生日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
    private String birthday;

    /** 地址 */
    @Excel(name = "地址")
    @NotBlank( message = "地址不能为空")
    private String address;

    /** 性别 */
    @Excel(name = "性别")
    @NotBlank( message = "性别不能为空")
    private String gender;

    /** 有效起始日期，version为1时返回此字段 */
    @Excel(name = "有效起始日期，version为1时返回此字段")
    private String validFrom;

    /** 准驾车型 */
    @Excel(name = "准驾车型")
    private String type;

    /** 版本号，2008或更早版本返回1，2013版本返回2 */
    @Excel(name = "版本号，2008或更早版本返回1，2013版本返回2")
    private String version;

    /** 初次领证日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "初次领证日期", width = 30, dateFormat = "yyyy-MM-dd")
    private String dateOfFirstIssue;

    /** 有效期限，格式如 2013-07-02至2019-07-02 */
    @Excel(name = "有效期限，格式如 2013-07-02至2019-07-02")
    private String validDate;

    /** 国籍 */
    @Excel(name = "国籍")
    private String nationality;

    /** 签发机关 */
    @Excel(name = "签发机关")
    private String issueBy;

    /** 有效期限长度，version为1时返回此字段 */
    @Excel(name = "有效期限长度，version为1时返回此字段")
    private String validFor;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setFileNumber(String fileNumber)
    {
        this.fileNumber = fileNumber;
    }

    public String getFileNumber()
    {
        return fileNumber;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setDriverId(String driverId)
    {
        this.driverId = driverId;
    }

    public String getDriverId()
    {
        return driverId;
    }
    public void setBirthday(String birthday)
    {
        this.birthday = birthday;
    }

    public String getBirthday()
    {
        return birthday;
    }
    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getAddress()
    {
        return address;
    }
    public void setGender(String gender)
    {
        this.gender = gender;
    }

    public String getGender()
    {
        return gender;
    }
    public void setValidFrom(String validFrom)
    {
        this.validFrom = validFrom;
    }

    public String getValidFrom()
    {
        return validFrom;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }
    public void setVersion(String version)
    {
        this.version = version;
    }

    public String getVersion()
    {
        return version;
    }
    public void setDateOfFirstIssue(String dateOfFirstIssue)
    {
        this.dateOfFirstIssue = dateOfFirstIssue;
    }

    public String getDateOfFirstIssue()
    {
        return dateOfFirstIssue;
    }
    public void setValidDate(String validDate)
    {
        this.validDate = validDate;
    }

    public String getValidDate()
    {
        return validDate;
    }
    public void setNationality(String nationality)
    {
        this.nationality = nationality;
    }

    public String getNationality()
    {
        return nationality;
    }
    public void setIssueBy(String issueBy)
    {
        this.issueBy = issueBy;
    }

    public String getIssueBy()
    {
        return issueBy;
    }
    public void setValidFor(String validFor)
    {
        this.validFor = validFor;
    }

    public String getValidFor()
    {
        return validFor;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("fileNumber", getFileNumber())
            .append("name", getName())
            .append("driverId", getDriverId())
            .append("birthday", getBirthday())
            .append("address", getAddress())
            .append("gender", getGender())
            .append("validFrom", getValidFrom())
            .append("type", getType())
            .append("version", getVersion())
            .append("dateOfFirstIssue", getDateOfFirstIssue())
            .append("validDate", getValidDate())
            .append("nationality", getNationality())
            .append("issueBy", getIssueBy())
            .append("validFor", getValidFor())
            .toString();
    }
}
